import time
from BoolEquations import BoolEquations

def main():
    num_variable = 10
    print("运行规模: {:d}变元".format(num_variable))

    # 时间计时开始
    time_start = time.time()

    # 类对象
    equations = BoolEquations(num_variable)
    print("正在生成方程组及经典求解中...（请耐心等待）")
    
    # 运行算法，返回具有唯一解的方程组
    equations.run()
    # 打印方程组
    equations.print_equations()

    print("经典算法求解答案：")
    # 打印结果
    print(equations.result_set)

    # 时间计时结束
    time_end = time.time()
    print('生成方程组运行时间:%fs' % (time_end - time_start))

if __name__ == "__main__":
    main()

